﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using ComicSharp.Helpers;

namespace ComicSharp
{
    static class Program
    {
        public static string tempPath = string.Empty;

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            try
            {
                Application.Run(new frmViewer());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ComicSharp Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                // Clean up on exit
                FileHelper.DeleteTempFolder();
                Application.Exit();
            }
        }
    }
}
